package com.ht.web360.base.dto.ObjInfo.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ht.web360.base.enums.ObjType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Schema(description = "对象信息传输对象")
public class ObjInfoDto {
    @TableId
    @Schema(description = "主键")
    String id;

    @Schema(description = "对象名称")
    String name;

    @Schema(description = "对象链接")
    String link;

    @Schema(description = "预览链接")
    String preview;

    @Schema(description = "对象类型")
    ObjType type;

    @Schema(description = "创建对象的用户")
    @TableField(fill = FieldFill.INSERT)
    String creatorId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    LocalDateTime updateTime;
}
